import { defineComponent, KeepAlive } from 'vue';
import { useRoute, RouterView } from 'vue-router';
export default defineComponent({
  setup() {
    const route = useRoute();
    return () => {
      return (
        <RouterView>
          {{
            default: ({ Component }: any) => {
              return route.meta.keepAlive ? <KeepAlive>{Component}</KeepAlive> : Component;
            },
          }}
        </RouterView>
      );
    };
  },
});
